home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_c / cuj0696.zip / DWYER.ZIP / SPECTRAL.TST / PUTXFLT.CX < prev    next >
Text File  |  1996-03-07  |  825b  |  28 lines

  1. /* ============ */
  2. /* PutXFlt.cx    */
  3. /* ============ */
  4. #include <stdio.h>
  5. #include <xtendefs.h>
  6. #include <string.h>
  7. /* ========================================================= */
  8. /* PutXFlt - Prints extended value in float format on stdout */
  9. /* ========================================================= */
  10. void
  11. PutXFlt(USHORT *XFlt, short NFlt, short MinFld)
  12. {
  13.     char    AscVal[128] = {0};
  14.     short   CharCt;
  15.  
  16.     XTOASC(XFlt, AscVal, NFlt);        /* Convert to ASCII        */
  17.  
  18.     printf(AscVal);
  19.  
  20.     /* -------------------------------------------------------- */
  21.     /* Fill field with blanks on the right to MinFld characters */ 
  22.     /* -------------------------------------------------------- */
  23.     for (CharCt = (short)strlen(AscVal); CharCt < MinFld; ++CharCt)
  24.     {
  25.     printf(" ");
  26.     }
  27. }
  28.